package org.middleware.dao.system;

import org.middleware.entity.system.SysRoles;
import org.middleware.mapper.system.SysRolesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class SysRolesDao {

    @Autowired
    private SysRolesMapper rolesMapper;

    public int insert(SysRoles role) {
        return rolesMapper.queryInsert(role);
    }

    public List<SysRoles> searchRoles() {
        return rolesMapper.queryRoles();
    }

    public int update(SysRoles role) {
        return rolesMapper.queryUpdate(role);
    }

    public int delete(int id) {
        return rolesMapper.queryDelete(id);
    }
}
